$(function(){
	$("#searchRealNamePerson_dategrid").datagrid_init;
	/*==初始化表格*/
	$('#searchRealNamePerson_dategrid').datagrid({
		loadMsg : "数据加载中",
        emptyMsg : "数据加载完成,当前无数据!",
		border:false,
		fit : true,
		title : "实名制人员情况",
		fitColumns : true,
		pagination : true,
		rownumbers : true,
		singleSelect : true,
		// toolbar:"#searchRealNamePerson_dategrid_toolbar",
		columns : [ [
		    {field : 'id',				title : '主键',			width:50 , align:'center',hidden:true},
		    {field : 'name',		title : '姓名',			width:50 , align:'center',hidden:false},
		    {field : 'gender',				title : '性别',			width:50 , align:'center',hidden:false,
		    	formatter: function(value,row,index){
					return 	value;
				}
		    },
		    {field : 'category',			title : '人员类别',		width:50 , align:'center',hidden:false,
		    	formatter: function(value,row,index){
                    return 	value;
				}
		    },
		    
		    {field : 'idnum',			title : '身份证号',		width:50 , align:'center',hidden:false,
		    	formatter: function(value,row,index){
		    		return value;
		    	}
		    },
		    {field : 'age',				title : '年龄',			width:50 , align:'center',hidden:false,
		    	formatter: function(value,row,index){
					if(value < 0){
						return "0";
					}
					return value;
				}
		    },
		    {field : 'ssbm',			title : '所属部门',			width:50 , align:'center',hidden:false}
		] ],
        onLoadSuccess:function(data){
            $(this).datagrid('doCellTip',{'max-width':'300px','delay':500});
        }
	});

	var params = {};
	$("#searchRealNamePerson_dategrid").datagrid_pagination(basepath+"/user/v1/selectPersonList",JSON.stringify(params),"","" );

});
	